package router

import (
	"gitee.com/huanfion/urlshortener/internal/api"
	"github.com/gin-gonic/gin"
)

func Routers(engine *gin.Engine) {
	engine.GET("/", api.Index)
	apigroup := engine.Group("/api")
	{
		apigroup.POST("/url", api.CreateUrl)
		apigroup.GET("/:code", api.RedirectURL)
	}

}
